package com.reremouse.rerebbs.web.mb;

import com.reremouse.ejb.IPSeekerServiceRemote;
import com.reremouse.util.SpringHelper;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;

@ManagedBean
@RequestScoped
public class Index {
    int i = 5;
    String[] ss = {"li", "tie"};
    String address;
    IPSeekerServiceRemote ipSeeker = (IPSeekerServiceRemote) SpringHelper.getSpringBean("ipSeekerService");

    public int getI() {
        return this.i;
    }

    public void setI(int i) {
        this.i = i;
    }

    public String getAddress() {
        return this.address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String[] getSs() {
        return this.ss;
    }

    public void setSs(String[] ss) {
        this.ss = ss;
    }

    @PostConstruct
    public void init() {
        HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
        String ip = request.getRemoteAddr();
        this.address = this.ipSeeker.seek(ip);
    }
}



/* Location:           F:\jsp源码\蝙蝠论坛系统\rerebbs\WEB-INF\classes\

 * Qualified Name:     com.reremouse.rerebbs.web.mb.Index

 * JD-Core Version:    0.7.0.1

 */